#pragma once
#ifndef THREAD_H
#define THREAD_H

#include "stdafx.h"
#include "hawthorn.h"
#include <vector>

HAWTHORN_NAMESPACE_EBGIN

class _declspec(dllexport) Thread
{
public:
	typedef unsigned int(__stdcall*thread_callback_t)(void *);
	
	Thread(thread_callback_t func);
	virtual ~Thread(void);

	inline unsigned int getThreadId() { return _thread_id; }

	void join();

private:
	HANDLE                  _handle;
	unsigned int            _thread_id;
	thread_callback_t       _func;
	std::vector<void*>      _v;

};

HAWTHORN_NAMESPACE_END
#endif   //  THREAD_H
